import time
import os
num_files = int(input("请输入要创建的文件的数量："))
directory = "D:\我的仓库\woxihuanni-master\小组作业\实验11"
if not os.path.exists(directory):
    os.makedirs(directory)
for i in range(num_files):
    current_time = time.strftime('%Y%m%d%H%M%S', time.localtime())
    file_name = os.path.join(directory, f'{current_time}.txt')
    with open(file_name, 'w') as f:
        pass
    print(f"{time.ctime()}")
    print(f"file {i + 1}:{file_name}")
    print("创建成功")